From: Mukesh Rathor Date: Wed, 13 Nov 2013 08:53:30 +0000 (+0100) Subject: PVH dom0: allow all physdev ops X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5956 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fef491f2d974d4e33eec5b2a4d23fedae0f93fbd;p=xen.git PVH dom0: allow all physdev ops Allow a PVH dom0 access to all PHYSDEVOP_* ops. Signed-off-by: Mukesh Rathor Convert flow and adjust indentation. Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 6efdd8522f..3b353ecaa1 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3278,14 +3278,16 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { switch ( cmd ) { - case PHYSDEVOP_map_pirq: - case PHYSDEVOP_unmap_pirq: - case PHYSDEVOP_eoi: - case PHYSDEVOP_irq_status_query: - case PHYSDEVOP_get_free_pirq: - return do_physdev_op(cmd, arg); - default: + default: + if ( !is_pvh_vcpu(current) || !is_hardware_domain(current->domain) ) return -ENOSYS; + /* fall through */ + case PHYSDEVOP_map_pirq: + case PHYSDEVOP_unmap_pirq: + case PHYSDEVOP_eoi: + case PHYSDEVOP_irq_status_query: + case PHYSDEVOP_get_free_pirq: + return do_physdev_op(cmd, arg); } }